<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Verifying Inter</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Verifying Inter' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../intern.html">Inter Modules</a></li><li><a href="index.html">bytecode</a></li><li><a href="index.html#3">Chapter 3: Their Instructions</a></li><li><b>Verifying Inter</b></li></ul></div>
<p class="purpose">Verifying that a new Inter instruction is correct and consistent.</p>

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. </b>Each time a new instruction is created within <a href="../inter/index.html" class="internal">inter</a>, or loaded in
from a binary Inter file, it is "verified". We use a flag in the preframe for
the instruction to ensure that it is verified only once, for the sake both of
speed and to ensure that certain one-time-only operations are indeed done
one time only.
</p>

<p class="commentary">As this implies, "verification" is not quite the passive business which the
name makes it seem. Verification does indeed perform many sanity checks on
an instruction, but it also cross-references the Inter tree to accommodate
the new instruction. (Because of this, unverified instructions may not work,
and this is why the code to create instructions automatically calls us.)
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="function-syntax">VerifyingInter::instruction</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">VerifyingInter::instruction</span></span>:<br/>Transmigration - <a href="2-trn.html#SP5_1_1">&#167;5.1.1</a>, <a href="2-trn.html#SP5_2_1_1">&#167;5.2.1.1</a><br/>Inter in Binary Files - <a href="3-iibf.html#SP10_1_5_3">&#167;10.1.5.3</a><br/>The Comment Construct - <a href="4-tcc.html#SP2">&#167;2</a><br/>The Constant Construct - <a href="4-tcc2.html#SP2">&#167;2</a>, <a href="4-tcc2.html#SP4">&#167;4</a><br/>The Insert Construct - <a href="4-tic.html#SP2">&#167;2</a><br/>The Instance Construct - <a href="4-tic2.html#SP2">&#167;2</a><br/>The Nop Construct - <a href="4-tnc.html#SP2">&#167;2</a><br/>The Origin Construct - <a href="4-toc.html#SP2">&#167;2</a><br/>The Package Construct - <a href="4-tpc.html#SP4">&#167;4</a><br/>The PackageType Construct - <a href="4-tpc2.html#SP2">&#167;2</a><br/>The Permission Construct - <a href="4-tpc3.html#SP2">&#167;2</a><br/>The Pragma Construct - <a href="4-tpc4.html#SP2">&#167;2</a><br/>The Primitive Construct - <a href="4-tpc5.html#SP2">&#167;2</a><br/>The Property Construct - <a href="4-tpc6.html#SP2">&#167;2</a><br/>The PropertyValue Construct - <a href="4-tpc7.html#SP2">&#167;2</a><br/>The Provenance Construct - <a href="4-tpc8.html#SP2">&#167;2</a><br/>The Typename Construct - <a href="4-ttc.html#SP2">&#167;2</a><br/>The Variable Construct - <a href="4-tvc.html#SP2">&#167;2</a><br/>The Assembly Construct - <a href="5-tac.html#SP2">&#167;2</a><br/>The Cast Construct - <a href="5-tcc.html#SP2">&#167;2</a><br/>The Code Construct - <a href="5-tcc2.html#SP2">&#167;2</a><br/>The Evaluation Construct - <a href="5-tec.html#SP2">&#167;2</a><br/>The Inv Construct - <a href="5-tic.html#SP3">&#167;3</a><br/>The Lab Construct - <a href="5-tlc.html#SP2">&#167;2</a><br/>The Label Construct - <a href="5-tlc2.html#SP2">&#167;2</a><br/>The Local Construct - <a href="5-tlc3.html#SP2">&#167;2</a><br/>The Ref Construct - <a href="5-trc.html#SP2">&#167;2</a><br/>The Reference Construct - <a href="5-trc2.html#SP2">&#167;2</a><br/>The Splat Construct - <a href="5-tsc.html#SP2">&#167;2</a><br/>The Val Construct - <a href="5-tvc.html#SP2">&#167;2</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_package</span><span class="plain-syntax"> *</span><span class="identifier-syntax">owner</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">P</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-in.html#SP10" class="function-link"><span class="function-syntax">Inode::get_vflag</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="2-in.html#SP10" class="function-link"><span class="function-syntax">Inode::set_vflag</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_construct</span><span class="plain-syntax"> *</span><span class="identifier-syntax">IC</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="identifier-syntax">E</span><span class="plain-syntax"> = </span><a href="3-ic.html#SP14" class="function-link"><span class="function-syntax">InterInstruction::get_construct</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, &amp;</span><span class="identifier-syntax">IC</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">E</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="3-vi.html#SP1_1" class="named-paragraph-link"><span class="named-paragraph">Check the extent of the instruction</span><span class="named-paragraph-number">1.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">IC</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">symbol_defn_field</span><span class="plain-syntax"> &gt;= </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="named-paragraph-container code-font"><a href="3-vi.html#SP1_2" class="named-paragraph-link"><span class="named-paragraph">Set the symbol definition to this instruction</span><span class="named-paragraph-number">1.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="3-vi.html#SP1_3" class="named-paragraph-link"><span class="named-paragraph">Apply construct-specific checks</span><span class="named-paragraph-number">1.3</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP1_1" class="paragraph-anchor"></a><b>&#167;1.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Check the extent of the instruction</span><span class="named-paragraph-number">1.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">P</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">W</span><span class="plain-syntax">.</span><span class="element-syntax">extent</span><span class="plain-syntax"> &lt; </span><span class="identifier-syntax">IC</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">min_extent</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">P</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">W</span><span class="plain-syntax">.</span><span class="element-syntax">extent</span><span class="plain-syntax"> &gt; </span><span class="identifier-syntax">IC</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">max_extent</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">msg</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::new</span><span class="plain-syntax">();</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">msg</span><span class="plain-syntax">, </span><span class="string-syntax">"%S instruction has extent %d words, which is not between %d and %d"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">IC</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">construct_name</span><span class="plain-syntax">, </span><span class="identifier-syntax">P</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">W</span><span class="plain-syntax">.</span><span class="element-syntax">extent</span><span class="plain-syntax">, </span><span class="identifier-syntax">IC</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">min_extent</span><span class="plain-syntax">, </span><span class="identifier-syntax">IC</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">max_extent</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">msg</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-vi.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2" class="paragraph-anchor"></a><b>&#167;1.2. </b>Some instructions create new symbols, giving them definitions: for example,
if <span class="extract"><span class="extract-syntax">P</span></span> is <span class="extract"><span class="extract-syntax">constant bakers_dozen = 13</span></span> then a new <span class="extract"><span class="extract-syntax">bakers_dozen</span></span> symbol must
be created and given the node <span class="extract"><span class="extract-syntax">P</span></span> as its definition.
</p>

<p class="commentary">We create the symbol when we create the instruction. But the assignment of the
instruction as the definition of the symbol happens only during verification.
This is done because binary Inter files do contain the symbols and the instructions,
but not the assignments of which instruction is the definition of which symbol.
Instead, these assignments are deduced as each instruction is verified.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Set the symbol definition to this instruction</span><span class="named-paragraph-number">1.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">P</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">W</span><span class="plain-syntax">.</span><span class="element-syntax">extent</span><span class="plain-syntax"> &lt; </span><span class="identifier-syntax">IC</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">symbol_defn_field</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"extent wrong"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_symbols_table</span><span class="plain-syntax"> *</span><span class="identifier-syntax">T</span><span class="plain-syntax"> = </span><a href="2-pck.html#SP10" class="function-link"><span class="function-syntax">InterPackage::scope</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">owner</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">SID</span><span class="plain-syntax"> = </span><span class="identifier-syntax">P</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">W</span><span class="plain-syntax">.</span><span class="element-syntax">instruction</span><span class="plain-syntax">[</span><span class="identifier-syntax">IC</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">symbol_defn_field</span><span class="plain-syntax">];</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">S</span><span class="plain-syntax"> = </span><a href="2-st.html#SP13" class="function-link"><span class="function-syntax">InterSymbolsTable::symbol_from_ID_not_following</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">SID</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">IC</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">construct_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">LOCAL_IST</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">IC</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">construct_ID</span><span class="plain-syntax"> == </span><span class="constant-syntax">LABEL_IST</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">T</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"no symbols table in function"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="3-vi.html#SP1_2_2" class="named-paragraph-link"><span class="named-paragraph">Make a local definition</span><span class="named-paragraph-number">1.2.2</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">T</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="identifier-syntax">T</span><span class="plain-syntax"> = </span><a href="2-in.html#SP6" class="function-link"><span class="function-syntax">Inode::globals</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="named-paragraph-container code-font"><a href="3-vi.html#SP1_2_1" class="named-paragraph-link"><span class="named-paragraph">Make a global definition</span><span class="named-paragraph-number">1.2.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">E</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">E</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-vi.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2_1" class="paragraph-anchor"></a><b>&#167;1.2.1. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Make a global definition</span><span class="named-paragraph-number">1.2.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">S</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">E</span><span class="plain-syntax"> = </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"no symbol for global definition ID"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-tw2.html#SP2" class="function-link"><span class="function-syntax">Wiring::is_wired</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">CE</span><span class="plain-syntax"> = </span><a href="2-tw2.html#SP3" class="function-link"><span class="function-syntax">Wiring::cable_end</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">LOG</span><span class="plain-syntax">(</span><span class="string-syntax">"This is $6 but $3 ~~&gt; $3 in $6\n"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><a href="2-pck.html#SP12" class="function-link"><span class="function-syntax">InterPackage::container</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">), </span><span class="identifier-syntax">S</span><span class="plain-syntax">, </span><span class="identifier-syntax">CE</span><span class="plain-syntax">, </span><a href="2-pck.html#SP12" class="function-link"><span class="function-syntax">InterPackage::container</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">CE</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">definition</span><span class="plain-syntax">));</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">E</span><span class="plain-syntax"> = </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"symbol defined outside its native scope"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><a href="2-sym.html#SP19" class="function-link"><span class="function-syntax">InterSymbol::identifier</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-sym.html#SP9" class="function-link"><span class="function-syntax">InterSymbol::misc_but_undefined</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><a href="2-sym.html#SP15" class="function-link"><span class="function-syntax">InterSymbol::define</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">, </span><span class="identifier-syntax">P</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="comment-syntax">/* if (P != InterSymbol::definition(S)) */</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">E</span><span class="plain-syntax"> = </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"duplicated symbol"</span><span class="plain-syntax">, </span><a href="2-sym.html#SP19" class="function-link"><span class="function-syntax">InterSymbol::identifier</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-vi.html#SP1_2">&#167;1.2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_2_2" class="paragraph-anchor"></a><b>&#167;1.2.2. </b><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Make a local definition</span><span class="named-paragraph-number">1.2.2</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">S</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">E</span><span class="plain-syntax"> = </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"no symbol for local variable ID"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-sym.html#SP15" class="function-link"><span class="function-syntax">InterSymbol::is_defined</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><a href="2-sym.html#SP15" class="function-link"><span class="function-syntax">InterSymbol::define</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">, </span><span class="identifier-syntax">P</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="comment-syntax">/* if (P != InterSymbol::definition(S)) */</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">E</span><span class="plain-syntax"> = </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"duplicated local symbol"</span><span class="plain-syntax">, </span><a href="2-sym.html#SP19" class="function-link"><span class="function-syntax">InterSymbol::identifier</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    }</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-vi.html#SP1_2">&#167;1.2</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP1_3" class="paragraph-anchor"></a><b>&#167;1.3. </b>Finally we will check, where we can do so speedily, that the bytecode for the
instruction passes various sanity checks. This is partly to catch errors in our
own work (i.e. bugs in the code generating instructions), but also because raw
bytecode read in by <a href="3-iibf.html" class="internal">Inter in Binary Files</a> is not trustworthy. There's less
chance of garbage bytecode crashing the compiler if we take precautions.
</p>

<p class="commentary">All that <a href="3-ic.html#SP17" class="internal">InterInstruction::verify</a> does is to call the <span class="extract"><span class="extract-syntax">CONSTRUCT_VERIFY_MTID</span></span>
method for the construct of the instruction. So, for example, for <span class="extract"><span class="extract-syntax">PROPERTY_IST</span></span>
instructions this is done by <a href="4-tpc6.html#SP3" class="internal">PropertyInstruction::verify</a>, and so on.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Apply construct-specific checks</span><span class="named-paragraph-number">1.3</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">E</span><span class="plain-syntax"> = </span><a href="3-ic.html#SP17" class="function-link"><span class="function-syntax">InterInstruction::verify</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">owner</span><span class="plain-syntax">, </span><span class="identifier-syntax">IC</span><span class="plain-syntax">, </span><span class="identifier-syntax">P</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-vi.html#SP1">&#167;1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. </b>Although that work is delegated to the implementation of each construct, it's
convenient for those implementations to use the functions below for some common
sorts of check.
</p>

<p class="commentary">Firstly, this tests that a field in a bytecode instruction which purportedly
holds a symbol ID, <span class="extract"><span class="extract-syntax">SID</span></span>, actually does so: and that the symbol if defined
is defined by a given <span class="extract"><span class="extract-syntax">construct</span></span>. It can still be undefined (this allows for,
e.g., the symbol to be wired to a plug for definition in some other compilation
block, or for it not to be defined yet because the rest of the bytecode for
the program has not yet been loaded); but it cannot be the wrong sort of thing.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="function-syntax">VerifyingInter::SID_field</span><button class="popup" onclick="togglePopup('usagePopup2')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup2">Usage of <span class="code-font"><span class="function-syntax">VerifyingInter::SID_field</span></span>:<br/>The Instance Construct - <a href="4-tic2.html#SP3">&#167;3</a><br/>The Package Construct - <a href="4-tpc.html#SP5">&#167;5</a><br/>The Permission Construct - <a href="4-tpc3.html#SP3">&#167;3</a><br/>The PropertyValue Construct - <a href="4-tpc7.html#SP3">&#167;3</a><br/>The Typename Construct - <a href="4-ttc.html#SP3">&#167;3</a><br/>The Inv Construct - <a href="5-tic.html#SP4">&#167;4</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_package</span><span class="plain-syntax"> *</span><span class="identifier-syntax">owner</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">P</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">field</span><span class="plain-syntax">, </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">construct</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-vi.html#SP2" class="function-link"><span class="function-syntax">VerifyingInter::SID</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">owner</span><span class="plain-syntax">, </span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">P</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">W</span><span class="plain-syntax">.</span><span class="element-syntax">instruction</span><span class="plain-syntax">[</span><span class="identifier-syntax">field</span><span class="plain-syntax">], </span><span class="identifier-syntax">construct</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="function-syntax">VerifyingInter::SID</span><button class="popup" onclick="togglePopup('usagePopup3')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup3">Usage of <span class="code-font"><span class="function-syntax">VerifyingInter::SID</span></span>:<br/><a href="3-vi.html#SP6">&#167;6</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_package</span><span class="plain-syntax"> *</span><span class="identifier-syntax">owner</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">P</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">SID</span><span class="plain-syntax">, </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">construct</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_symbols_table</span><span class="plain-syntax"> *</span><span class="identifier-syntax">T</span><span class="plain-syntax"> = </span><a href="2-pck.html#SP10" class="function-link"><span class="function-syntax">InterPackage::scope</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">owner</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">T</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="identifier-syntax">T</span><span class="plain-syntax"> = </span><a href="2-in.html#SP6" class="function-link"><span class="function-syntax">Inode::globals</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">S</span><span class="plain-syntax"> = </span><a href="2-st.html#SP13" class="function-link"><span class="function-syntax">InterSymbolsTable::symbol_from_ID</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">SID</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">S</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"no symbol for SID (case 3)"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">D</span><span class="plain-syntax"> = </span><a href="2-sym.html#SP15" class="function-link"><span class="function-syntax">InterSymbol::definition</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-sym.html#SP18" class="function-link"><span class="function-syntax">InterSymbol::defined_elsewhere</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-sym.html#SP9" class="function-link"><span class="function-syntax">InterSymbol::misc_but_undefined</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">construct</span><span class="plain-syntax"> != </span><span class="constant-syntax">INVALID_IST</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">D</span><span class="plain-syntax">) &amp;&amp; (</span><a href="2-in.html#SP13" class="function-link"><span class="function-syntax">Inode::isnt</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">D</span><span class="plain-syntax">, </span><span class="identifier-syntax">construct</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">err</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::new</span><span class="plain-syntax">();</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">err</span><span class="plain-syntax">, </span><span class="string-syntax">"symbol has type %d not %d: "</span><span class="plain-syntax">, </span><a href="2-in.html#SP13" class="function-link"><span class="function-syntax">Inode::get_construct_ID</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">D</span><span class="plain-syntax">), </span><span class="identifier-syntax">construct</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><a href="2-st.html#SP18" class="function-link"><span class="function-syntax">InterSymbolsTable::write_symbol_URL</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">err</span><span class="plain-syntax">, </span><span class="identifier-syntax">S</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">err</span><span class="plain-syntax">, </span><a href="2-sym.html#SP19" class="function-link"><span class="function-syntax">InterSymbol::identifier</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b>The same, but where the ID refers to a symbol in the tree's global symbols
table (such as a primitive invocation):
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="function-syntax">VerifyingInter::GSID_field</span><button class="popup" onclick="togglePopup('usagePopup4')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup4">Usage of <span class="code-font"><span class="function-syntax">VerifyingInter::GSID_field</span></span>:<br/>The Package Construct - <a href="4-tpc.html#SP5">&#167;5</a><br/>The Inv Construct - <a href="5-tic.html#SP4">&#167;4</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">field</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">construct</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">GSID</span><span class="plain-syntax"> = </span><span class="identifier-syntax">P</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">W</span><span class="plain-syntax">.</span><span class="element-syntax">instruction</span><span class="plain-syntax">[</span><span class="identifier-syntax">field</span><span class="plain-syntax">];</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">S</span><span class="plain-syntax"> = </span><a href="2-st.html#SP13" class="function-link"><span class="function-syntax">InterSymbolsTable::symbol_from_ID</span></a><span class="plain-syntax">(</span><a href="2-in.html#SP6" class="function-link"><span class="function-syntax">Inode::globals</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">), </span><span class="identifier-syntax">GSID</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">S</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"no global symbol for GSID"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">D</span><span class="plain-syntax"> = </span><a href="2-sym.html#SP15" class="function-link"><span class="function-syntax">InterSymbol::definition</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-sym.html#SP18" class="function-link"><span class="function-syntax">InterSymbol::defined_elsewhere</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-sym.html#SP9" class="function-link"><span class="function-syntax">InterSymbol::misc_but_undefined</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">D</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"undefined global symbol"</span><span class="plain-syntax">, </span><a href="2-sym.html#SP19" class="function-link"><span class="function-syntax">InterSymbol::identifier</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><a href="2-in.html#SP13" class="function-link"><span class="function-syntax">Inode::isnt</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">D</span><span class="plain-syntax">, </span><span class="identifier-syntax">construct</span><span class="plain-syntax">)) &amp;&amp;</span>
<span class="plain-syntax">        (</span><a href="2-sym.html#SP18" class="function-link"><span class="function-syntax">InterSymbol::defined_elsewhere</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">        (</span><a href="2-sym.html#SP9" class="function-link"><span class="function-syntax">InterSymbol::misc_but_undefined</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">))</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"global symbol of wrong type"</span><span class="plain-syntax">, </span><a href="2-sym.html#SP19" class="function-link"><span class="function-syntax">InterSymbol::identifier</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. </b>This checks an ID for a symbol which has to represent a property owner &mdash; so,
either the typename for an enumerated type, or an instance.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="function-syntax">VerifyingInter::POID_field</span><button class="popup" onclick="togglePopup('usagePopup5')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup5">Usage of <span class="code-font"><span class="function-syntax">VerifyingInter::POID_field</span></span>:<br/>The Permission Construct - <a href="4-tpc3.html#SP3">&#167;3</a><br/>The PropertyValue Construct - <a href="4-tpc7.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_package</span><span class="plain-syntax"> *</span><span class="identifier-syntax">owner</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">P</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">field</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">POID</span><span class="plain-syntax"> = </span><span class="identifier-syntax">P</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">W</span><span class="plain-syntax">.</span><span class="element-syntax">instruction</span><span class="plain-syntax">[</span><span class="identifier-syntax">field</span><span class="plain-syntax">];</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_symbols_table</span><span class="plain-syntax"> *</span><span class="identifier-syntax">T</span><span class="plain-syntax"> = </span><a href="2-pck.html#SP10" class="function-link"><span class="function-syntax">InterPackage::scope</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">owner</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">T</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="identifier-syntax">T</span><span class="plain-syntax"> = </span><a href="2-in.html#SP6" class="function-link"><span class="function-syntax">Inode::globals</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_symbol</span><span class="plain-syntax"> *</span><span class="identifier-syntax">S</span><span class="plain-syntax"> = </span><a href="2-st.html#SP13" class="function-link"><span class="function-syntax">InterSymbolsTable::symbol_from_ID</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">POID</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">S</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"no symbol for property-owner ID"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">D</span><span class="plain-syntax"> = </span><a href="2-sym.html#SP15" class="function-link"><span class="function-syntax">InterSymbol::definition</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-sym.html#SP18" class="function-link"><span class="function-syntax">InterSymbol::defined_elsewhere</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-sym.html#SP9" class="function-link"><span class="function-syntax">InterSymbol::misc_but_undefined</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">D</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"undefined property-owner symbol"</span><span class="plain-syntax">, </span><a href="2-sym.html#SP19" class="function-link"><span class="function-syntax">InterSymbol::identifier</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><a href="2-in.html#SP13" class="function-link"><span class="function-syntax">Inode::isnt</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">D</span><span class="plain-syntax">, </span><span class="constant-syntax">TYPENAME_IST</span><span class="plain-syntax">)) &amp;&amp;</span>
<span class="plain-syntax">        (</span><a href="2-sym.html#SP18" class="function-link"><span class="function-syntax">InterSymbol::defined_elsewhere</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">        (</span><a href="2-in.html#SP13" class="function-link"><span class="function-syntax">Inode::isnt</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">D</span><span class="plain-syntax">, </span><span class="constant-syntax">INSTANCE_IST</span><span class="plain-syntax">)) &amp;&amp;</span>
<span class="plain-syntax">        (</span><a href="2-sym.html#SP9" class="function-link"><span class="function-syntax">InterSymbol::misc_but_undefined</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">))</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"property-owner symbol of wrong type"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                </span><a href="2-sym.html#SP19" class="function-link"><span class="function-syntax">InterSymbol::identifier</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">S</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. </b>Next, a field which purportedly holds a type constructor such as <span class="extract"><span class="extract-syntax">INT32_ITCONC</span></span>
or <span class="extract"><span class="extract-syntax">FUNCTION_ITCONC</span></span>: see <a href="3-idt.html" class="internal">Inter Data Types</a>.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="function-syntax">VerifyingInter::constructor_field</span><button class="popup" onclick="togglePopup('usagePopup6')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup6">Usage of <span class="code-font"><span class="function-syntax">VerifyingInter::constructor_field</span></span>:<br/>The Typename Construct - <a href="4-ttc.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">field</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">ID</span><span class="plain-syntax"> = </span><span class="identifier-syntax">P</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">W</span><span class="plain-syntax">.</span><span class="element-syntax">instruction</span><span class="plain-syntax">[</span><span class="identifier-syntax">field</span><span class="plain-syntax">];</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-idt.html#SP2" class="function-link"><span class="function-syntax">InterTypes::is_valid_constructor_code</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">ID</span><span class="plain-syntax">) == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"unknown type constructor"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP6" class="paragraph-anchor"></a><b>&#167;6. </b>Next, a field which purportedly holds a valid type ID (TID): again, see
<a href="3-idt.html" class="internal">Inter Data Types</a>.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="function-syntax">VerifyingInter::TID_field</span><button class="popup" onclick="togglePopup('usagePopup7')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup7">Usage of <span class="code-font"><span class="function-syntax">VerifyingInter::TID_field</span></span>:<br/>The Constant Construct - <a href="4-tcc2.html#SP5">&#167;5</a><br/>The Package Construct - <a href="4-tpc.html#SP5">&#167;5</a><br/>The Property Construct - <a href="4-tpc6.html#SP3">&#167;3</a><br/>The Typename Construct - <a href="4-ttc.html#SP3">&#167;3</a><br/>The Variable Construct - <a href="4-tvc.html#SP3">&#167;3</a><br/>The Cast Construct - <a href="5-tcc.html#SP3">&#167;3</a><br/>The Local Construct - <a href="5-tlc3.html#SP3">&#167;3</a><br/>The Ref Construct - <a href="5-trc.html#SP3">&#167;3</a><br/>The Val Construct - <a href="5-tvc.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_package</span><span class="plain-syntax"> *</span><span class="identifier-syntax">owner</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">P</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">field</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">TID</span><span class="plain-syntax"> = </span><span class="identifier-syntax">P</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">W</span><span class="plain-syntax">.</span><span class="element-syntax">instruction</span><span class="plain-syntax">[</span><span class="identifier-syntax">field</span><span class="plain-syntax">];</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">TID</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-idt.html#SP2" class="function-link"><span class="function-syntax">InterTypes::is_valid_constructor_code</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">TID</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-vi.html#SP2" class="function-link"><span class="function-syntax">VerifyingInter::SID</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">owner</span><span class="plain-syntax">, </span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">TID</span><span class="plain-syntax">, </span><span class="constant-syntax">TYPENAME_IST</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP7" class="paragraph-anchor"></a><b>&#167;7. </b>Next, a field which purportedly holds a valid text ID:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="function-syntax">VerifyingInter::text_field</span><button class="popup" onclick="togglePopup('usagePopup8')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup8">Usage of <span class="code-font"><span class="function-syntax">VerifyingInter::text_field</span></span>:<br/>The Comment Construct - <a href="4-tcc.html#SP3">&#167;3</a><br/>The Insert Construct - <a href="4-tic.html#SP3">&#167;3</a><br/>The Origin Construct - <a href="4-toc.html#SP3">&#167;3</a><br/>The Pragma Construct - <a href="4-tpc4.html#SP3">&#167;3</a><br/>The Inv Construct - <a href="5-tic.html#SP4">&#167;4</a><br/>The Splat Construct - <a href="5-tsc.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_package</span><span class="plain-syntax"> *</span><span class="identifier-syntax">owner</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">P</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">field</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">text_ID</span><span class="plain-syntax"> = </span><span class="identifier-syntax">P</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">W</span><span class="plain-syntax">.</span><span class="element-syntax">instruction</span><span class="plain-syntax">[</span><span class="identifier-syntax">field</span><span class="plain-syntax">];</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_warehouse</span><span class="plain-syntax"> *</span><span class="identifier-syntax">W</span><span class="plain-syntax"> = </span><a href="2-it.html#SP3" class="function-link"><span class="function-syntax">InterTree::warehouse</span></a><span class="plain-syntax">(</span><a href="2-in.html#SP6" class="function-link"><span class="function-syntax">Inode::tree</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-tw.html#SP6" class="function-link"><span class="function-syntax">InterWarehouse::known_type_code</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_ID</span><span class="plain-syntax">) == </span><span class="constant-syntax">TEXT_IRSRC</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"not a valid text ID"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP8" class="paragraph-anchor"></a><b>&#167;8. </b>And a node list ID:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="function-syntax">VerifyingInter::node_list_field</span><button class="popup" onclick="togglePopup('usagePopup9')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup9">Usage of <span class="code-font"><span class="function-syntax">VerifyingInter::node_list_field</span></span>:<br/>The Instance Construct - <a href="4-tic2.html#SP3">&#167;3</a><br/>The Property Construct - <a href="4-tpc6.html#SP3">&#167;3</a><br/>The Typename Construct - <a href="4-ttc.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_package</span><span class="plain-syntax"> *</span><span class="identifier-syntax">owner</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">P</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">field</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">text_ID</span><span class="plain-syntax"> = </span><span class="identifier-syntax">P</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">W</span><span class="plain-syntax">.</span><span class="element-syntax">instruction</span><span class="plain-syntax">[</span><span class="identifier-syntax">field</span><span class="plain-syntax">];</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_warehouse</span><span class="plain-syntax"> *</span><span class="identifier-syntax">W</span><span class="plain-syntax"> = </span><a href="2-it.html#SP3" class="function-link"><span class="function-syntax">InterTree::warehouse</span></a><span class="plain-syntax">(</span><a href="2-in.html#SP6" class="function-link"><span class="function-syntax">Inode::tree</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-tw.html#SP6" class="function-link"><span class="function-syntax">InterWarehouse::known_type_code</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_ID</span><span class="plain-syntax">) == </span><span class="constant-syntax">NODE_LIST_IRSRC</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"not a valid node list ID"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP9" class="paragraph-anchor"></a><b>&#167;9. </b>And a symbols table ID:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="function-syntax">VerifyingInter::symbols_table_field</span><button class="popup" onclick="togglePopup('usagePopup10')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup10">Usage of <span class="code-font"><span class="function-syntax">VerifyingInter::symbols_table_field</span></span>:<br/>The Package Construct - <a href="4-tpc.html#SP5">&#167;5</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_package</span><span class="plain-syntax"> *</span><span class="identifier-syntax">owner</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">field</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">text_ID</span><span class="plain-syntax"> = </span><span class="identifier-syntax">P</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">W</span><span class="plain-syntax">.</span><span class="element-syntax">instruction</span><span class="plain-syntax">[</span><span class="identifier-syntax">field</span><span class="plain-syntax">];</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_warehouse</span><span class="plain-syntax"> *</span><span class="identifier-syntax">W</span><span class="plain-syntax"> = </span><a href="2-it.html#SP3" class="function-link"><span class="function-syntax">InterTree::warehouse</span></a><span class="plain-syntax">(</span><a href="2-in.html#SP6" class="function-link"><span class="function-syntax">Inode::tree</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-tw.html#SP6" class="function-link"><span class="function-syntax">InterWarehouse::known_type_code</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_ID</span><span class="plain-syntax">) == </span><span class="constant-syntax">SYMBOLS_TABLE_IRSRC</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"not a valid symbols table ID"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP10" class="paragraph-anchor"></a><b>&#167;10. </b>And a package ID:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="function-syntax">VerifyingInter::package_field</span><button class="popup" onclick="togglePopup('usagePopup11')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup11">Usage of <span class="code-font"><span class="function-syntax">VerifyingInter::package_field</span></span>:<br/>The Package Construct - <a href="4-tpc.html#SP5">&#167;5</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_package</span><span class="plain-syntax"> *</span><span class="identifier-syntax">owner</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">field</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="constant-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">text_ID</span><span class="plain-syntax"> = </span><span class="identifier-syntax">P</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">W</span><span class="plain-syntax">.</span><span class="element-syntax">instruction</span><span class="plain-syntax">[</span><span class="identifier-syntax">field</span><span class="plain-syntax">];</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_warehouse</span><span class="plain-syntax"> *</span><span class="identifier-syntax">W</span><span class="plain-syntax"> = </span><a href="2-it.html#SP3" class="function-link"><span class="function-syntax">InterTree::warehouse</span></a><span class="plain-syntax">(</span><a href="2-in.html#SP6" class="function-link"><span class="function-syntax">Inode::tree</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="2-tw.html#SP6" class="function-link"><span class="function-syntax">InterWarehouse::known_type_code</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">text_ID</span><span class="plain-syntax">) == </span><span class="constant-syntax">PACKAGE_REF_IRSRC</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="2-in.html#SP15" class="function-link"><span class="function-syntax">Inode::error</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">I</span><span class="string-syntax">"not a valid package ID"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP11" class="paragraph-anchor"></a><b>&#167;11. </b>Finally, two consecutive fields which purportedly hold a valid data pair in
the context of the current package:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">inter_error_message</span><span class="plain-syntax"> *</span><span class="function-syntax">VerifyingInter::data_pair_fields</span><button class="popup" onclick="togglePopup('usagePopup12')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup12">Usage of <span class="code-font"><span class="function-syntax">VerifyingInter::data_pair_fields</span></span>:<br/>The Constant Construct - <a href="4-tcc2.html#SP5">&#167;5</a><br/>The Instance Construct - <a href="4-tic2.html#SP3">&#167;3</a><br/>The PropertyValue Construct - <a href="4-tpc7.html#SP3">&#167;3</a><br/>The Variable Construct - <a href="4-tvc.html#SP3">&#167;3</a><br/>The Ref Construct - <a href="5-trc.html#SP3">&#167;3</a><br/>The Val Construct - <a href="5-tvc.html#SP3">&#167;3</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">inter_package</span><span class="plain-syntax"> *</span><span class="identifier-syntax">owner</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">inter_tree_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">first_field</span><span class="plain-syntax">, </span><span class="reserved-syntax">inter_type</span><span class="plain-syntax"> </span><span class="identifier-syntax">type</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-ivp.html#SP22" class="function-link"><span class="function-syntax">InterValuePairs::verify</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">owner</span><span class="plain-syntax">, </span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><a href="3-ivp.html#SP19" class="function-link"><span class="function-syntax">InterValuePairs::get</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">P</span><span class="plain-syntax">, </span><span class="identifier-syntax">first_field</span><span class="plain-syntax">), </span><span class="identifier-syntax">type</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="3-iitf.html">&#10094;</a></li><li class="progresschapter"><a href="P-wtmd.html">P</a></li><li class="progresschapter"><a href="1-bm.html">1</a></li><li class="progresschapter"><a href="2-it.html">2</a></li><li class="progresscurrentchapter">3</li><li class="progresssection"><a href="3-ic.html">ic</a></li><li class="progresssection"><a href="3-iibf.html">iibf</a></li><li class="progresssection"><a href="3-iitf.html">iitf</a></li><li class="progresscurrent">vi</li><li class="progresssection"><a href="3-ivp.html">ivp</a></li><li class="progresssection"><a href="3-idt.html">idt</a></li><li class="progresssection"><a href="3-mtd.html">mtd</a></li><li class="progresssection"><a href="3-ie.html">ie</a></li><li class="progresssection"><a href="3-tp.html">tp</a></li><li class="progresschapter"><a href="4-tcc.html">4</a></li><li class="progresschapter"><a href="5-tac.html">5</a></li><li class="progresschapter"><a href="6-tpc.html">6</a></li><li class="progressnext"><a href="3-ivp.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

